package com.fengycx.remote.impl;

import cn.dev33.satoken.stp.StpUtil;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.fengycx.feign.DriverConfirmFeeApi;
import com.fengycx.param.DriverConfirmOrderDto;
import com.fengycx.param.DriverSummeryDto;
import com.fengycx.pojo.domain.DriverSummary;
import com.fengycx.result.R;
import com.fengycx.service.IDriverSummaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DriverConfirmFeeImpl implements DriverConfirmFeeApi {

    @Autowired
    private IDriverSummaryService driverSummaryService;

    @Override
    public R<DriverSummeryDto> selectDriverSummary( ) {
        DriverSummary summary = driverSummaryService.getById(StpUtil.getLoginIdAsLong());
        DriverSummeryDto driverSummeryDto = new DriverSummeryDto();
        BeanUtil.copyProperties(summary,driverSummeryDto);
        return R.success(driverSummeryDto);
    }
}
